<?php
require_once __DIR__.'/admin/Bootstrap.php';

require_once __DIR__.'/site2/includes/ProductMgr.class.php';

$productMgr= new ProductMgr();



$_main_content = new Templater(__DIR__.'/site2/views/product/default.html');
$id=getFormValue('id');
if(isset($id))
$_main_content->set('product',$productMgr->getProduct($id));

$_page = new Templater(__DIR__.'/site2/views/page/page.html');
$_page->set("content", $_main_content->parse());
$_page->publish();
?>
		<script>
			$(function () {
				$('#myTab a:first').tab('show');
				$('#myTab a').click(function (e) {
					e.preventDefault();
					$(this).tab('show');
				})
			});
		</script>